<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>
<div class="container" id="page">
<div id="header" >
	<div id="logo" ><img src = "<?php echo Yii::app()->request->baseUrl; ?>/css/images/logo.png" alt="logo" /></div>
	<div id = "userPanel">
		<?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'注册', 'url'=>array('/site/register'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>'登录', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>Yii::app()->user->name, 'url'=>array('/user/view', 'id'=>Yii::app()->user->id),  'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'注销', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),
			),
		)); ?>
	</div>
	<span style = "float: left; margin-top: 60px;">
		<?php echo CHtml::link('地球人之见', array('/site/stage'))?>
	</span>
	<div style = "position: relative; top: 30px; right: 0;  height: 30px">
	<?php 
		// 获取贡献值提示信息
		if(Yii::app()->user->hasFlash('score')){
			echo '<div class = "info">';
			echo "<div class = 'infoImg2'></div>";
			echo "<div class = 'infoText'>";
			echo Yii::app()->user->getFlash('score');
			echo "</div>";
			echo '</div>';
		}
	?>
	</div>
</div><!-- header -->
<div id="mainmenu" >
		<?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'首页', 'url'=>array('/site')),
				// array('label'=>'故事', 'url'=>array('/story')),
				array('label'=>'事件', 'url'=>array('/node','tid'=>DefineBox::EVENT_TYPE_CODE)),
				// array('label'=>'时间', 'url'=>array('/time'), 'active'=>Yii::app()->controller->id=='time'),
				array('label'=>'地点', 'url'=>array('/node', 'tid'=>DefineBox::SCENE_TYPE_CODE)),
				array('label'=>'角色', 'url'=>array('/node', 'tid'=>DefineBox::ROLE_TYPE_CODE)),
				array('label'=>'物品', 'url'=>array('/node', 'tid'=>DefineBox::OBJECT_TYPE_CODE)),
				array('label'=>'知识', 'url'=>array('/node','tid'=>DefineBox::PEDIA_TYPE_CODE)),
				array('label'=>'社区', 'url'=>array('/community')),
			),
		)); ?>
</div><!-- mainmenu -->
	<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
	<?php endif?>

	<?php echo $content; ?>

	<div class="clear"></div>

	<div id="footer">
		<?php echo CHtml::link('关于CloudBody', array('/site/cloudbody')); ?> | 
		<?php echo CHtml::link('关于我们', array('/site/us')); ?> | 
		<?php echo CHtml::link('联系我们', array('/site/contact')); ?>
		<br/>
		Copyleft &copy; <?php echo date('Y'); ?> by Patianhu Studio. 本站所有内容均为原创并基于<a href="http://creativecommons.net.cn/">知识共享</a>发布，属<a href = "http://zh.wikipedia.org/wiki/%E5%85%AC%E6%9C%89%E9%A0%98%E5%9F%9F">公有领域</a>文化作品，请随意传播。

	</div><!-- footer -->
</div><!-- page -->
</body>
</html>
